<?php 
include_once('connection/connection.php');
include('config.php');
include('header.php');
include('menu.php');
?>
<?php
$sc=$_REQUEST['scheme'];
if($sc==1)
{
 $sc="P&T";
}
if($sc==2)
{
 $sc="Piped";
}
if($sc==3)
{
 $sc="RWSS";
}
if($sc==4)
{
 $sc="Sanitary Diggs";
}
if($sc==5)
{
 $sc="HP";
}

?>

<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="js/validate1.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxFunction_q1.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxFunction1_q1.js"></script>
<script language=javascript>

function disEnb(val)
{
var status=document.getElementById('function_status'+val).value;
if(status == 'NOT FUNCTIONAL')
{
document.getElementById('opration_status'+val).disabled = true;
document.getElementById('quality_status'+val).disabled = true;
document.getElementById('yield'+val).disabled = true;
document.getElementById('seasonal_flunctuation'+val).disabled = true;
document.getElementById('fluctuation_min'+val).disabled = true;
document.getElementById('fluctuation_max'+val).disabled = true;
document.getElementById('ph'+val).disabled = true;
document.getElementById('tds'+val).disabled = true;
document.getElementById('f'+val).disabled = true;
document.getElementById('cl'+val).disabled = true;
document.getElementById('no3'+val).disabled = true;
document.getElementById('my_hp'+val).style.visibility = 'hidden';
document.getElementById('HPtesting_date'+val).disabled = true;
document.getElementById('Repairable'+val).disabled = false;
document.getElementById('remarks'+val).disabled = false;
}
if(status == 'FUNCTIONAL')
{
document.getElementById('opration_status'+val).disabled = false;
document.getElementById('quality_status'+val).disabled = false;
document.getElementById('yield'+val).disabled = false;
document.getElementById('seasonal_flunctuation'+val).disabled = false;
document.getElementById('fluctuation_min'+val).disabled = false;
document.getElementById('fluctuation_max'+val).disabled = false;
document.getElementById('ph'+val).disabled = false;
document.getElementById('tds'+val).disabled = false;
document.getElementById('f'+val).disabled = false;
document.getElementById('cl'+val).disabled = false;
document.getElementById('no3'+val).disabled = false;
document.getElementById('my_hp'+val).style.visibility = 'visible';
document.getElementById('HPtesting_date'+val).disabled = false;
document.getElementById('Repairable'+val).disabled = true;
document.getElementById('remarks'+val).disabled = true;
}
}
function disEnbsp(val)
{
var status=document.getElementById('sp_function_status'+val).value;
if(status == 'NOT FUNCTIONAL')
{
document.getElementById('sp_opration_status'+val).disabled = true;
document.getElementById('sp_quality_status'+val).disabled = true;
document.getElementById('sp_yield'+val).disabled = true;
document.getElementById('sp_seasonal_flunctuation'+val).disabled = true;
document.getElementById('sp_fluctuation_min'+val).disabled = true;
document.getElementById('sp_fluctuation_max'+val).disabled = true;
document.getElementById('sp_ph'+val).disabled = true;
document.getElementById('sp_tds'+val).disabled = true;
document.getElementById('sp_f'+val).disabled = true;
document.getElementById('sp_cl'+val).disabled = true;
document.getElementById('sp_no3'+val).disabled = true;
document.getElementById('SPtesting_date'+val).disabled = true;
document.getElementById('my_sp'+val).style.visibility = 'hidden';
document.getElementById('sp_Repairable'+val).disabled = false;
document.getElementById('sp_remarks'+val).disabled = false;
}
if(status == 'FUNCTIONAL')
{
document.getElementById('sp_opration_status'+val).disabled = false;
document.getElementById('sp_quality_status'+val).disabled = false;
document.getElementById('sp_yield'+val).disabled = false;
document.getElementById('sp_seasonal_flunctuation'+val).disabled = false;
document.getElementById('sp_fluctuation_min'+val).disabled = false;
document.getElementById('sp_fluctuation_max'+val).disabled = false;
document.getElementById('sp_ph'+val).disabled = false;
document.getElementById('sp_tds'+val).disabled = false;
document.getElementById('sp_f'+val).disabled = false;
document.getElementById('sp_cl'+val).disabled = false;
document.getElementById('sp_no3'+val).disabled = false;
document.getElementById('SPtesting_date'+val).disabled = false;
document.getElementById('my_sp'+val).style.visibility = 'visible';
document.getElementById('sp_Repairable'+val).disabled = true;
document.getElementById('sp_remarks'+val).disabled = true;
}
}
function mult()
{
	var value1=document.getElementById('popul_benefited').value;
	var value2=Math.round(value1 * 1.29);
	//var value2=Math.round(value1 * 1.4);
	document.getElementById('present_popul').value=value2;	
}
function mult2()
{
      for(var j=0;j<document.questionnaire1.length;j++){
		//alert("hi");
         if(document.questionnaire1.elements[j].type=="radio"){
            document.questionnaire1.elements[j].disabled=false;
            }}
	var value1=document.getElementById('factor1').value;
	var value2=document.getElementById('population_benefited1').value;
	var value3=Math.round(value1 * value2);
	document.getElementById('present_population1').value=value3;
	alert('Value of Population Benefited Field is '+ value2 +', Present Population is '+ value3 +' and Population Factor is ' + value1);	
}
</script>
<script type="text/javascript" src="js/jquery.js"></script>
<script language="javascript" src="js/cal2.js">
/*
Xin's Popup calendar script-  Xin Yang (http://www.yxscripts.com/)
Script featured on/available at http://www.dynamicdrive.com/
This notice must stay intact for use
*/
</script>
<script language="javascript" type="text/javascript">

function showID()
{
//Define calendar(s): addCalendar ("Unique Calendar Name", "Window title", "Form element's name", Form name")
var num=document.getElementById("num_source").value;
var i=1;
for (i=1;i<=num;i++)
{
addCalendar("Calendar" + i, "Select Date", "testing_date" + i, "questionnaire1");
}
// default settings for English
// Uncomment desired lines and modify its values
// setFont("verdana", 9);
 setWidth(90, 1, 15, 1);
// setColor("#cccccc", "#cccccc", "#ffffff", "#ffffff", "#333333", "#cccccc", "#333333");
// setFontColor("#333333", "#333333", "#333333", "#ffffff", "#333333");
// setFormat("yyyy/mm/dd");
// setSize(200, 200, -200, 16);

// setWeekDay(0);
// setMonthNames("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
// setDayNames("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
// setLinkNames("[Close]", "[Clear]");
}
function showHPID()
{
//Define calendar(s): addCalendar ("Unique Calendar Name", "Window title", "Form element's name", Form name")
var num1=document.getElementById("hp_no").value;
var i=1;
for (i=1;i<=num1;i++)
{
addCalendar("HPCalendar" + i, "Select Date", "HPtesting_date" + i, "questionnaire1");
}
// default settings for English
// Uncomment desired lines and modify its values
// setFont("verdana", 9);
 setWidth(90, 1, 15, 1);
// setColor("#cccccc", "#cccccc", "#ffffff", "#ffffff", "#333333", "#cccccc", "#333333");
// setFontColor("#333333", "#333333", "#333333", "#ffffff", "#333333");
// setFormat("yyyy/mm/dd");
// setSize(200, 200, -200, 16);

// setWeekDay(0);
// setMonthNames("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
// setDayNames("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
// setLinkNames("[Close]", "[Clear]");
}
function showSPID()
{
//Define calendar(s): addCalendar ("Unique Calendar Name", "Window title", "Form element's name", Form name")
var num1=document.getElementById("sp_no").value;
var i=1;
for (i=1;i<=num1;i++)
{
addCalendar("SPCalendar" + i, "Select Date", "SPtesting_date" + i, "questionnaire1");
}
// default settings for English
// Uncomment desired lines and modify its values
// setFont("verdana", 9);
 setWidth(90, 1, 15, 1);
// setColor("#cccccc", "#cccccc", "#ffffff", "#ffffff", "#333333", "#cccccc", "#333333");
// setFontColor("#333333", "#333333", "#333333", "#ffffff", "#333333");
// setFormat("yyyy/mm/dd");
// setSize(200, 200, -200, 16);

// setWeekDay(0);
// setMonthNames("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
// setDayNames("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
// setLinkNames("[Close]", "[Clear]");
}
</script>
<title><?php echo $sc;?>&nbsp;Schemes</title>
<style type="text/css">
<!--
.style1 {color: #FFFFFF}
-->
</style>
</head>
<body onLoad="enable_sanc(false);">
<?php
date_default_timezone_set('Asia/Kolkata');
$stamp = time();
$getdate = getdate($stamp);
/* ----------------------------------------------------------------- function for dob starts ---------------------------------------------------------  */
function dpulldown($name,$d,$m,$y)//This function will provide the pulldown for date
{
	$stamp = time();
	$getdate = getdate($stamp);
	$months = array(1 => 'January','February','March','April','May','June','July','August','September','October','November','December');
	echo'<select name="'.$name.'date" class="date">';
	for($date = 1; $date <= 31; $date++)
	{
		echo'<option value="'.$date.'" ';if($d == $date) echo'selected="selected"'; echo'>'.$date.'</option>';
	}
	echo'</select>';
	echo'<select name="'.$name.'month" class="date">';
	foreach($months as $key => $value)
	{
		echo'<option value="'.$key.'" ';if($m == $key) echo'selected="selected"'; echo'>'.$value.'</option>';
	}
	echo'</select>';
	echo'<select name="'.$name.'year" class="date">';
	for($year = 2005; $year <= ($getdate['year']); $year++)
	{
		echo'<option value="'.$year.'" ';if($y == $year) echo'selected="selected"'; echo'>'.$year.'</option>';
	}
	echo'</select>';
}
/* ----------------------------------------------------------------- End function for dob starts ---------------------------------------------------------  */



/* ---------------------------------------------- start form submission code ---------------------------------------------------------------  */

if(isset($_POST['submit']))
{
		$fclick = true;
		$dob = $_POST['dobyear'].'-'.$_POST['dobmonth'].'-'.$_POST['dobdate'];
		$id=$_POST['id'];
		$form_id=$_POST['form_id'];
		$_SESSION['form_id']=$form_id;
		$district=$_POST['district'];
		$block=$_POST['block'];
		$tehsil=$_POST['tehsil'];
		$panchayat=$_POST['panchayat'];
		$village=$_POST['village'];
		$cvc=$_POST['cvc'];
		$type_scheme=$_POST['type_scheme'];	
		//$type_scheme=implode(',',$type_scheme); 
		$name_scheme=$_POST['name_scheme'];
		$year=$_POST['year'];
		$capital_cost=$_POST['capital_cost'];
				
		if($_POST['scheme_sactioned']!='Other')
		{
			$scheme_sactioned=$_POST['scheme_sactioned'];
		}
		else
		{
			$scheme_sactioned=$_POST['scheme_sactioned_other'];
		}
		//$scheme_sactioned=$_POST['scheme_sactioned'];
		//$scheme_sactioned_other=$_POST['scheme_sactioned_other'];
		//$scheme_sactioned=implode(',',$scheme_sactioned); 
		//$scheme_sactioned=$scheme_sactioned . $scheme_sactioned_other;
		//echo $scheme_sactioned;
		//exit();
		$popul_benefited=$_POST['population_benefited1'];
		$present_popul=$_POST['present_population1'];
		$num_source=$_POST['num_source'];
		$hp_no=$_POST['hp_no'];
		$sp_no=$_POST['sp_no'];

/* ------------------------------------- insert query for table one ------------------------------ */		
		$q1="INSERT INTO tbl_dtls_q1_main(id, form_id, district_id, date, block_id, tehsil_id, panchayat_id, village_id, cvc, type_scheme, name_scheme, year_comm, capital_cost, scheme_sactioned, population_benefited, present_population, no_sources, hp_nos, sp_nos, post_date) VALUES ('$id', '$form_id', '$district', '$dob','$block', '$tehsil', '$panchayat', '$village', '$cvc', '$type_scheme', '$name_scheme', '$year', '$capital_cost', '$scheme_sactioned', '$popul_benefited', '$present_popul', '$num_source', '$hp_no', '$sp_no', NOW())"; 
		$r1=mysql_query($q1);
/* ------------------------------------- End insert query for table one ------------------------------ */
			
/* ------------------------------------- insert query for OH table  ------------------------------ */			
		$q2="SELECT DISTINCT habitation_code, habitation_name from tbl_lookup_location where village_id='$village' order by habitation_code";
		$r2=mysql_query($q2);
		$num_rows = mysql_num_rows($r2);
		//$_SESSION['num_rows']=$num_rows;
		//echo $num_rows;
		$q3="SELECT id FROM tbl_dtls_q1_main where form_id='$form_id'";
		$r3=mysql_query($q3);
		$x=mysql_fetch_array($r3);
		$loc_id=$x['id'];
		$_SESSION['loc_id']=$loc_id;
		for($i=1; $i<=$num_rows; $i++)
		{
			$hname = 'name_habi'.$i;
			$hcode = 'habi_code'.$i;
			$type_habit='type_habit'.$i;
			$status = 'status'.$i;
			$cover = 'cover'.$i;
			$HP_no='HP_no'.$i;
			$SP_no='SP_no'.$i;
			
			$hname=$_POST[$hname];	
			$hcode=$_POST[$hcode];
			$type_habit=$_POST[$type_habit];
			$status=$_POST[$status];
			$cover=$_POST[$cover];
			$HP_no=$_POST[$HP_no];
			$SP_no=$_POST[$SP_no];
						
			$q4="INSERT INTO tbl_dtls_q1_oh(loc_id, habit_name,habit_code,type_habit,HP,SP,status_e_nt,status_covered) VALUES ('$loc_id', '$hname', '$hcode', '$type_habit','$HP_no','$SP_no', '$status', '$cover')";
			$r4=mysql_query($q4);	
		}	
		
/* ------------------------------------- End insert query for OH table  ------------------------------ */	


/* ------------------------------------- insert query for Unlisted habit table  ------------------------------ */				
		$num_habit=$_POST['num_habit'];
			for($i=1; $i<=$num_habit; $i++)
			{
				$un_habit='un_habit'.$i;
				$un_habit=$_POST[$un_habit];
				$q5="INSERT INTO tbl_dtls_q1_unhabit(loc_id, unhabit_name) VALUES ('$loc_id', '$un_habit')";
				$r5=mysql_query($q5);	
			}
			
			
/* ------------------------------------- insert query for Unlisted habit table  ------------------------------ */

	
/* ------------------------------------- php code start for sources	------------------------------ */
		for($i=1; $i<=$num_source; $i++)
		{
			$source='source'.$i;
			$source_location='source_location'.$i;
			$source_latitude='source_latitude'.$i;
			$source_longitude='source_longitude'.$i;
			$yield_min='yield_min'.$i;
			$yield_max='yield_max'.$i;
			$water_table_min='water_table_min'.$i;
			$water_table_max='water_table_max'.$i;
			$current_status='current_status'.$i;
			$para_ph='para_ph'.$i;
			$para_tds='para_tds'.$i;
			$para_f='para_f'.$i;
			$para_cl='para_cl'.$i;
			$para_no3='para_no3'.$i;
			$testing_date='testing_date'.$i;
			
			$source=$_POST[$source];
			$source_location=$_POST[$source_location];
			$source_latitude=$_POST[$source_latitude];
			$source_longitude=$_POST[$source_longitude];
			$yield_min=$_POST[$yield_min];
			$yield_max=$_POST[$yield_max];
			$water_table_min=$_POST[$water_table_min];
			$water_table_max=$_POST[$water_table_max];
			$current_status=$_POST[$current_status];
			$para_ph=$_POST[$para_ph];
			$para_tds=$_POST[$para_tds];
			$para_f=$_POST[$para_f];
			$para_cl=$_POST[$para_cl];
			$para_no3=$_POST[$para_no3];
			$testing_date=$_POST[$testing_date];
			
			$q5="INSERT INTO tbl_dtls_q1_sws(loc_id,source,location,longitude,latitude,yield_min,yield_max,water_table_min,water_table_max,pH,TDS,Cl,F,no3,current_status,testing_date) VALUES ('$loc_id','$source','$source_location','$source_longitude','$source_latitude','$yield_min','$yield_max','$water_table_min','$water_table_max','$para_ph','$para_tds','$para_cl','$para_f','$para_no3','$current_status','$testing_date')";
			$r5=mysql_query($q5);	
		    }	

/* ------------------------------------- End php code start for sources	------------------------------ */

		
/* ------------------------------------- php code start for hp ------------------------------ */
		/*   
		for($i=1; $i<=$hp_no; $i++)
		{
			$habitation_code_name='habitation_name'.$i;
			$habittext='habittext'.$i;
			$habit_type='habit_type'.$i;
			$location='location'.$i;
			$latitude='latitude'.$i;
			$longitude='longitude'.$i;
			$function_status='function_status'.$i;
			$opration_status='opration_status'.$i;
			$quality_status='quality_status'.$i;
			$yield='yield'.$i;
			$seasonal_flunctuation='seasonal_flunctuation'.$i;
			$Repairable='Repairable'.$i;
			$fluctuation_min='fluctuation_min'.$i;
			$fluctuation_max='fluctuation_max'.$i;
			$ph='ph'.$i;
			$tds='tds'.$i;
			$f='f'.$i;
			$cl='cl'.$i;
			$no3='no3'.$i;
			$HPtesting_date='HPtesting_date'.$i;
			$remarks='remarks'.$i;
						
			$habitation_code_name=$_POST[$habitation_code_name];
			$return=explode(",",$habitation_code_name);
			$habitation_code=$return[0];
			$habittext=$return[1];
			$habit_type=$_POST[$habit_type];
			$location=$_POST[$location];
			$latitude=$_POST[$latitude];
			$longitude=$_POST[$longitude];
			$function_status=$_POST[$function_status];
			$opration_status=$_POST[$opration_status];
			$quality_status=$_POST[$quality_status];
			$yield=$_POST[$yield];
			$seasonal_flunctuation=$_POST[$seasonal_flunctuation];
			$Repairable=$_POST[$Repairable];
			$fluctuation_min=$_POST[$fluctuation_min];
			$fluctuation_max=$_POST[$fluctuation_max];
			$ph=$_POST[$ph];
			$tds=$_POST[$tds];
			$f=$_POST[$f];
			$cl=$_POST[$cl];
			$no3=$_POST[$no3];
			$HPtesting_date=$_POST[$HPtesting_date];
			$remarks=$_POST[$remarks];
			
			
			$q_hp="INSERT INTO tbl_dtls_hp_details_q1(loc_id,habit_code,habitation_name,type_of_habitation,hp_sp,location,latitude,longitude,functional_status,operational_status,quality_status,yeild,sea_fluct_yeild,water_table_fluct_min,water_table_fluct_max,ph,tds,cl,f,no3,para_date,last_modified,repairable_status,remark) VALUES ('$loc_id','$habitation_code','$habittext','$habit_type','HP','$location','$latitude','$longitude','$function_status','$opration_status','$quality_status','$yield','$seasonal_flunctuation','$fluctuation_min','$fluctuation_max','$ph','$tds','$cl','$f','$no3','$HPtesting_date',now(),'$Repairable','$remarks')";
			$r_hp=mysql_query($q_hp);	
		}	
		*/
/* ------------------------------------- End php code start for hp ------------------------------ */
		
/* ------------------------------------- php code start for sp ------------------------------ */
		/*
		for($i=1; $i<=$sp_no; $i++)
		{
			$sp_habitation_code_name='sp_habitation_name'.$i;
			$sp_habittext='sp_habittext'.$i;
			$sp_habit_type='sp_habit_type'.$i;
			$sp_location='sp_location'.$i;
			$sp_latitude='sp_latitude'.$i;
			$sp_longitude='sp_longitude'.$i;
			$sp_function_status='sp_function_status'.$i;
			$sp_opration_status='sp_opration_status'.$i;
			$sp_quality_status='sp_quality_status'.$i;
			$sp_yield='sp_yield'.$i;
			$sp_seasonal_flunctuation='sp_seasonal_flunctuation'.$i;
			$sp_Repairable='sp_Repairable'.$i;
			$sp_fluctuation_min='sp_fluctuation_min'.$i;
			$sp_fluctuation_max='sp_fluctuation_max'.$i;
			$sp_ph='sp_ph'.$i;
			$sp_tds='sp_tds'.$i;
			$sp_f='sp_f'.$i;
			$sp_cl='sp_cl'.$i;
			$sp_no3='sp_no3'.$i;
			$sp_HPtesting_date='SPtesting_date'.$i;
			$sp_remarks='sp_remarks'.$i;
						
			$sp_habitation_code_name=$_POST[$sp_habitation_code_name];
			$sp_return=explode(",",$sp_habitation_code_name);
			$sp_habitation_code=$sp_return[0];
			$sp_habittext=$sp_return[1];
			$sp_habit_type=$_POST[$sp_habit_type];
			$sp_location=$_POST[$sp_location];
			$sp_latitude=$_POST[$sp_latitude];
			$sp_longitude=$_POST[$sp_longitude];
			$sp_function_status=$_POST[$sp_function_status];
			$sp_opration_status=$_POST[$sp_opration_status];
			$sp_quality_status=$_POST[$sp_quality_status];
			$sp_yield=$_POST[$sp_yield];
			$sp_seasonal_flunctuation=$_POST[$sp_seasonal_flunctuation];
			$sp_Repairable=$_POST[$sp_Repairable];
			$sp_fluctuation_min=$_POST[$sp_fluctuation_min];
			$sp_fluctuation_max=$_POST[$sp_fluctuation_max];
			$sp_ph=$_POST[$sp_ph];
			$sp_tds=$_POST[$sp_tds];
			$sp_f=$_POST[$sp_f];
			$sp_cl=$_POST[$sp_cl];
			$sp_no3=$_POST[$sp_no3];
			$sp_HPtesting_date=$_POST[$sp_HPtesting_date];
			$sp_remarks=$_POST[$sp_remarks];
			
			
			$q_hp="INSERT INTO tbl_dtls_hp_details_q1(loc_id,habit_code,habitation_name,type_of_habitation,hp_sp,location,latitude,longitude,functional_status,operational_status,quality_status,yeild,sea_fluct_yeild,water_table_fluct_min,water_table_fluct_max,ph,tds,cl,f,no3,para_date,last_modified,repairable_status,remark) VALUES ('$loc_id','$sp_habitation_code','$sp_habittext','$sp_habit_type','SP','$sp_location','$sp_latitude','$sp_longitude','$sp_function_status','$sp_opration_status','$sp_quality_status','$sp_yield','$sp_seasonal_flunctuation','$sp_fluctuation_min','$sp_fluctuation_max','$sp_ph','$sp_tds','$sp_cl','$sp_f','$sp_no3','$sp_HPtesting_date',now(),'$sp_Repairable','$sp_remarks')";
			$r_hp=mysql_query($q_hp);	
		}	
		*/
/* ------------------------------------- End php code start for sp ------------------------------ */
		

		
/*------------------------  After final insertion redirection code   --------------------- */	
		//if($r_hp)
		//{
			header('Location: questionnaire1_2.php?sch='.$sc);
		//}								
}
else
{
	$fclick = false;
	$flag=0;
}
?>

<div align="center">
<form action="" method="post" enctype="multipart/form-data" name="questionnaire1" id="questionnaire1" onSubmit="mult2()">
	<table border="0" width="800" id="table1" cellspacing="0" cellpadding="0" style="padding-left:5px; padding-top:10px">
		<tr bgcolor="#EEEEEE">
			<td height="30" colspan="2">
			<p align="center">
			<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			<?php echo $sc;?>&nbsp;Schemes</font></td>
		</tr>
		
		<tr bgcolor="#EEEEEE">
			<td colspan="2" align="center"><font face="Arial" style="font-size: 8.5pt" color="#000000">Page 1</font></td>
		</tr>
		<tr bgcolor="#EEEEEE">
			<td height="19" colspan="2" align="center"><font face="Arial" style="font-size: 8.5pt" color="#000000">(This Web Application is More Compatible with Mozilla Firefox and Google Chrome)</font></td>
		</tr>
		
		<tr>
			<td colspan="2" bgcolor="#EEEEEE"><span style="font-size: 4pt">&nbsp;</span></td>
		</tr>
		<tr>
			<td height="27" colspan="2" bgcolor="#C5D8EB">
				<span class="style1" style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt; color:#006699">&nbsp;1. Scheme 
				Details</font></span>			</td>
		</tr>
		
		<tr>
			<td colspan="2">
			<table width="800" height="228" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" id="table6">
				
				<tr>
					<td width="220" height="27">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						Type of the Scheme (As of Now)</font>					</td>
					<td width="244">
					  <font style="font-size: 8.5pt" face="Verdana" color="#000000">
				  <input type="hidden" name="type_scheme" id="type_scheme"value="<?php echo $sc;?>"><b><?php echo $sc;?></b></font></td>
				    <td width="121"><font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">*</font>Date&nbsp;</font></td>
				    <td width="210"><?php dpulldown('dob',$getdate['mday'],$getdate['mon'],$getdate['year']);?></td>
				</tr>
				
				<tr>
					<td width="220" height="30">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Name of the Schemes </font>					</td>
					<td colspan="3">
						<input type="text" name="name_scheme" id="name_scheme" size="30" height="18" class="txt">					</td>
				</tr>
				<tr>
					<td width="220" height="31">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Year of Commissioning</font></td>
					<td colspan="3">
						<select size="1" name="year" id="year" class="txt">
						<option selected value="0">Not Provided</option>
						<?php 
						foreach($year_comm as $key=>$val)
						{
		   					echo "<option value=$val>$val</option>";
						}
						?>
						</select>					</td>
				</tr>
				<tr>
					<td width="220" height="32">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Capital Cost (in <img src="images/26rup1.jpg" width="10"> Lakh)</font></td>
						<!--<font face="Rupee Foradian" size="3">`</font>-->
					<td colspan="3">
						<input type="text" name="capital_cost" id="capital_cost" size="30" height="18" class="txt" onBlur="float(this)">					</td>
				</tr>
				<tr>
					<td width="220" height="35">&nbsp;
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">
						Schemes Sanctioned Under </font>					</td>
					<td colspan="3">
						<select size="1" name="scheme_sactioned" id="scheme_sactioned" class="txt" onChange="enable_sanc1(true)">
						<option selected value="0">Select Scheme</option>
						<?php 
						foreach($scheme as $key=>$val)
						{
		   					echo "<option value=$val>$val</option>";
						}
						?>
					  </select>				  </td>
			  </tr>
				<tr>
				  <td width="220" height="26">&nbsp;</td>
					<td colspan="3">
						 <font style="font-size: 8pt" face="Verdana" color="#000000"> If Other then specify&nbsp;</font><input type="text" name="scheme_sactioned_other" id="scheme_sactioned_other" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px">					</td>
				</tr>
			</table>		</td>
	</tr>
	<tr>
		<td colspan="2">
			<span style="font-size: 5pt">&nbsp;</span>		</td>
	</tr>
	<tr>
		<td height="29" colspan="2" bgcolor="#C5D8EB"><span class="style1">&nbsp;
		    <font style="font-size: 8.5pt; font-weight: 700; color:#006699" face="Arial">
			2. Location </font></span> </td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" width="800" id="table7" bgcolor="#EEEEEE" cellspacing="1" cellpadding=             "0">
				<tr>
					<td height="11" colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
						<td width="219">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">&nbsp;&nbsp;*</font>District</font>						</td>
						<td width="247"><font id=district>
							<select name="district" id="district" class="txt">
								<option value="0">Select District</option>
        					</select></font><span id="districtLoader"></span>
				  <font id="factor"><input type="hidden" size="20" class="txt5"></font></td>
							<td>&nbsp;</td><td>&nbsp;</td>
			  </tr>
							<tr>
						<td width="219">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;
							<font color="#FF0000">*</font>Block </font></td>
						<td width="247"><font id=block>
							<select name="block" class="txt">
								<option value="0">==============</option>
							</select></font><span id="blockLoader"></span></td>
						<td width="141">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">*</font>Revenue &nbsp;&nbsp;Tehsil&nbsp;&nbsp;&nbsp;</font>						</td>
						<td width="188"><font id=tehsil>
							<select name="tehsil" class="txt">
								<option value="0">==============</option>
							</select></font><span id="tehsilLoader"></span>				    	</td>
							
			    	</tr>
				<tr>
					<td width="219" height="29">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;                         <font color="#FF0000">*</font>Grampanchayat</font>					</td>
					<td width="247"><font id=panchayat>
						<select name="panchayat" class="txt">
						<option value="0">==============</option>
				  </select></font><span id="panchayatLoader"></span>			      </td>
						<td>&nbsp;</td><td>&nbsp;</td>
				</tr>
				<tr>
					<td width="219">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Village Covered Name (MH)</font></td>
					<td width="247"><font id=village>
						<select name="village" class="txt" >
						<option value="0">==============</option>
				  </select></font><span id="villageLoader"></span>				  </td>
						<td>&nbsp;</td><td>&nbsp;</td>
				</tr>
				<tr>
					<td width="219" height="24">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color=                        "#FF0000">*</font>Form Id</font></td>
					<td width="247"><div id="form_id">
				  <input type="text" size="23" class="txt" value=""></div>				  </td>
						<td width="141" height="28">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color=                        "#FF0000">*</font>Census Village Code</font></td>
					<td width="188"><font id=cvc>
						<input type="text" size="23" class="txt" value="">	
				  </font>				  </td>
				</tr>
				<tr>
					
				</tr>
				<tr>
					<td height="27" colspan="4" bgcolor="#C5D8EB">&nbsp;
					<font style="font-size: 8.5pt; font-weight: 700" face="Arial" color="#006699">
					3.Other Habitations (OH) covered</font></td>
				</tr>
			</table>		</td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" width="800" id="table4" cellspacing="1" cellpadding="0" bgcolor="#EEEEEE">
				<tr>
					<td colspan="5"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td align="center" width="20%" bgcolor="#cccccc" height="47">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Name of OH</font></td>
					<td align="center" width="24%" bgcolor="#cccccc" height="47">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Code No. (As per IMIS)</font></td>
						<td align="center" width="10%" rowspan="" bgcolor="#cccccc">
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Type MH/ OH</font></td>
					    <td align="center" width="9%" rowspan="" bgcolor="#cccccc"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">HP</font></td>
					    <td align="center" width="9%" rowspan="" bgcolor="#cccccc"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">SP</font></td>
				    <td align="center" width="13%" bgcolor="#cccccc" height="47">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Actual Status at Site (E/NT)</font></td>
				    <td align="center" width="15%" bgcolor="#cccccc"><font face="Verdana" style="font-size: 8.5pt" color="#990000">Actual Status of Coverage</font></td>
				</tr>	
			</table></td></tr>
	<tr>
		<td colspan="2"><div id="habit"></div></td>
	</tr>
	<tr><td colspan="4">&nbsp;</td></tr>
		<tr>
			<td width="176" height="22" bgcolor="#C5D8EB"><font color="#006699">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial">No. of Unlisted Habitation</font></font></td>
			<td width="624" bgcolor="#EEEEEE"><input type="text" name="num_habit" id="num_habit" value="" class="txt5" onKeyUp="showhabit();numeric(this)"></td>
		</tr>
		<tr><td colspan="3">&nbsp;</td></tr>
		<tr>
			<td colspan="3"><div id="show_unhabit"></div></td>
		</tr>
		<tr><td colspan="3">&nbsp;</td></tr>
	<tr>
		<td height="27" colspan="2" bgcolor="#C5D8EB">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#006699">4. Population</font></span></td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" width="800" id="table8" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
				
					<td width="172">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Population Benefited </font></td>
					<td width="202">
					<div id="population_benefited">
				    <input type="text" class="txt5" onBlur="numeric(this)" size="20">
				  	</div>
						<!--<input type="text" name="popul_benefited" id="popul_benefited" size="20" class="txt5" onBlur="mult();numeric(this)">-->				  </td>
					<td width="126">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">
						Present Population&nbsp;&nbsp;&nbsp;</font></td>
				  <td width="295">
				  <div id="present_population">
					<input type="text" size="20" class="txt5">
					</div>
					<!--<input type="text" name="present_popul" id="present_popul" size="20" class="txt5" onBlur="numeric(this)" readonly><font style="font-size: 8.5pt" face="Verdana" color="#000000">1.29 times of Population Benefited</font>--></td>
				</tr>
				<tr>
					<td width="172"><font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;(as per 2001 census)</font></td>
					<td width="126">&nbsp;</td>
					<td width="172"><font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;(2010)</font></td>
					<td width="295">&nbsp;</td>
				</tr>
			</table>		</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td height="27" colspan="2" bgcolor="#C5D8EB">&nbsp;<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#006699">5. Sources of Water Supply            </font></span>		</td>
	</tr>
	<tr>
		<td colspan="7">
			<table border="0" width="800" id="table10" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td>
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="162">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						No. of Sources</font></td>
					<td width="190"><input type="text" name="num_source" id="num_source" size="20" onBlur="source_dtls();numeric(this)" class="txt5"></td>
					<td width="186">&nbsp;</td>
					<td width="207">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="4"><font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;</font></td>
				</tr>
				
				<tr>
					<td colspan="6"><div id="source_dtls"></div></td>
				</tr>
			</table></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td height="27" colspan="2" bgcolor="#C5D8EB">&nbsp;
			<span style="font-weight: 700"><font face="Arial" style="font-size: 8.5pt" color="#006699">6. Hand pumps &amp; Single Phase pumps installed (on above	mentioned if any)</font></span></td>
	</tr>
	<tr>
		<td colspan="2">
			<table border="0" width="800" id="table11" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="157">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						HP Nos.</font>					</td>
					<td width="195"><div id="hpno">
						<!--<input type="text" name="hp_no" id="hp_no" size="20" class="txt5" onBlur="HP_source_dtls();numeric(this)">-->
					    <input type="text" name="hp_no" id="hp_no" size="20" class="txt5" readonly />
						</div>
					</td>
					<td width="186">&nbsp;</td>
					<td width="207">&nbsp;</td>
				</tr>
				<tr>
				  <td colspan="4"><div id="source_dtls_hp"></div></td>
			  </tr>
				<tr>
					<td width="157">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						SP Nos.</font>					</td>
					<td width="195"><div id="spno">
						<!--<input type="text" name="sp_no" id="sp_no" size="20" class="txt5" onBlur="SP_source_dtls();numeric(this)">-->
						<input type="text" name="sp_no" id="sp_no" size="20" class="txt5" readonly />
						</div>
						</td>
					<td width="186">&nbsp;</td>
					<td width="207">&nbsp;</td>
				</tr>
				<tr>
				  <td colspan="4"><div id="source_dtls_sp"></div></td>
			  </tr>
			</table></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">
			<p align="center">
			<input type="submit" value="Click for Continue" name="submit" style="font-family: Verdana;" onClick="return validate1()">&nbsp;</p></td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>
</table>
</form>		
</div>

</body>
</html>